#pragma once
#include "wc3main.h"

procedure wc3refcnt_Init();
void wc3refcnt_main();

	class TRefCnt_VMT
	{
		typedef procedure (__stdcall *Release_1) ();
		typedef procedure (__stdcall *Delete_1) (Boolean FreeMem);
	public:
		Release_1 Release;
		Delete_1 Delete;
	};

	typedef TRefCnt_VMT* PRefCnt_VMT;

	class TRefCnt
	{
	public:
		Pointer vtable;
		Dword References;
	public:
		procedure Release();
		procedure IncRef();
		procedure DecRef();
	};

	typedef TRefCnt* PRefCnt;

	//PRefCnt_VMT p_TRefCnt_VMT;
